package robot;
import java.util.ArrayList;
import java.util.List;

import lejos.nxt.Battery;
import lejos.nxt.LightSensor;
import lejos.nxt.SensorPort;
import lejos.nxt.TouchSensor;
import lejos.nxt.UltrasonicSensor;

public class SensorController{
	//TouchSensor touch, LightSensor light, UltrasonicSensor ultra, Battery battery
	List<Object> sensors = new ArrayList<Object>();
	TouchSensor touch = new TouchSensor(SensorPort.S1);
	LightSensor light = new LightSensor(SensorPort.S3);
	UltrasonicSensor ultra = new UltrasonicSensor(SensorPort.S4);
	Boolean tf = false;
	Battery battery ;

	public List<Integer> getAllSensorInfo()
	{
		List<Integer> sensorInfo = null;
		boolean touched =  touch.isPressed();
		if (touched)
		{
			//the touch integer
		}
		int lightLevel = light.getLightValue();
		float voltage = battery.getVoltage();
		//battery level

		//ultrasonic level

		//light level}
		return sensorInfo; //return a list of integer values for the sensors

	}
	public boolean tooClose()
	{
		if(ultra.getDistance() <= 5) //if object is 5cm to robot
		{
			tf = true;
		}
		return tf;
	}

}


